<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-12-07
 * Time: 11:39
 */
/**
 * 检测数组是否设置 ，防止报错
 */
function is_set($arr,$params){
    return @isset($arr[$params])?$arr[$params]:"";
}
function generalUniqueId(){
    $yCode = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J');
    $orderSn = $yCode[intval(date('Y')) - 2011] . strtoupper(dechex(date('m'))) . date('d') . substr(time(), -5) . substr(microtime(), 2, 5) . sprintf('%02d', rand(0, 99));
    return $orderSn;
}

/**
 * 拿到字符串转化为的时间戳
 */
function getStrTime($time){
    return strtotime(str_replace(["年","月","日","时","分","秒"],["-","-","",":",":",""],trim($time)));
}